package com.asdhawaii.otello.board;

import static org.junit.Assert.assertEquals;
import org.junit.Test;

/**
 * Tests the SquareContents enum.
 * 
 * @author Branden Ogata
 *
 */

public class TestSquareContents
{
  /**
   * Tests the methods of the SquareContents enum.
   * 
   */
  
  @Test
  public void test()
  {
    // Instances to test
    SquareContents empty = SquareContents.EMPTY;
    SquareContents white = SquareContents.WHITE;
    SquareContents black = SquareContents.BLACK;
    
    // Test the opposites
    assertEquals("Opposite of empty should be empty", empty.opposite(), SquareContents.EMPTY);
    assertEquals("Opposite of white should be black", white.opposite(), SquareContents.BLACK);
    assertEquals("Opposite of black should be white", black.opposite(), SquareContents.WHITE);
    
    // Test toString
    assertEquals("Test empty toString", empty.toString(), " ");
    assertEquals("Test white toString", white.toString(), "W");
    assertEquals("Test black toString", black.toString(), "B");
  }
}
